package de.dhe.opencart.repository.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the tax_rate_to_customer_group database table.
 * 
 */
@Embeddable
public class TaxRateToCustomerGroupPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="tax_rate_id")
	private int taxRateId;

	@Column(name="customer_group_id")
	private int customerGroupId;

    public TaxRateToCustomerGroupPK() {
    }
	public int getTaxRateId() {
		return this.taxRateId;
	}
	public void setTaxRateId(int taxRateId) {
		this.taxRateId = taxRateId;
	}
	public int getCustomerGroupId() {
		return this.customerGroupId;
	}
	public void setCustomerGroupId(int customerGroupId) {
		this.customerGroupId = customerGroupId;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TaxRateToCustomerGroupPK)) {
			return false;
		}
		TaxRateToCustomerGroupPK castOther = (TaxRateToCustomerGroupPK)other;
		return 
			(this.taxRateId == castOther.taxRateId)
			&& (this.customerGroupId == castOther.customerGroupId);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.taxRateId;
		hash = hash * prime + this.customerGroupId;
		
		return hash;
    }
}